home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / ListBox / CListBoxControl.h < prev    next >
Encoding:
Text File  |  1996-11-20  |  1.8 KB  |  70 lines  |  [TEXT/????]

  1. // =================================================================================
  2. //
  3. //    CListBoxControl.h                ©1996 Microsoft Corporation All rights reserved.
  4. //
  5. // =================================================================================
  6.  
  7. #ifndef _H_CListBoxControl
  8. #define _H_CListBoxControl
  9. #pragma once
  10.  
  11. #include "CBaseControl.h"
  12. #include "CBaseBindStatusCallback.h"
  13.  
  14. typedef struct
  15. {
  16.     Str255    Data;
  17.     Boolean    Inserted;
  18. }
  19. listitemdata;
  20.  
  21.  
  22. class CListBoxControl :
  23.         public CBaseControl,
  24.         public CBaseBindStatusCallback
  25. {
  26.  
  27. public:
  28.     // *** CListBoxControl methods ***
  29.     CListBoxControl(void);
  30.     ~CListBoxControl(void);
  31.  
  32.     // *** IUnknown methods ***
  33.     STDMETHOD (QueryInterface)(REFIID inRefID, void** outObj);
  34.  
  35.     // *** IControl methods ***
  36.     STDMETHOD (Draw) (THIS_ DrawContext* inContext);
  37.     STDMETHOD (SetFocus)(THIS_ FocusCommand inCommand, FocusSet inFocus);
  38.     STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent) ;
  39.     STDMETHOD (DoKey)(THIS_ KeyEventType inKeyET, Char8 inChar, PlatformEvent* inEvent) ;
  40.     STDMETHOD (DoIdle)(THIS_ Uint32 inIdleRefCon) ;
  41.  
  42.     //  *** IPersistPropertyBag methods ***
  43.     STDMETHOD (Load)(IPropertyBag* PropBag, IErrorLog* ErrorLog);
  44.     STDMETHOD (LoadTextState)(IPropertyBag *PropertyBag,IErrorLog* ErrorLog);
  45.  
  46.     //  *** IBindStatusCallback methods ***
  47.     STDMETHOD (OnStopBinding)(ErrorCode Result, const Char8* Error);
  48.     STDMETHOD (OnDataAvailable)(Uint32 BSCF, Uint32 Size, FORMATETC* FormatEtc, STGMEDIUM* StgMedium);
  49.  
  50.  
  51. private:
  52.     // *** private methods ***
  53.     void        DrawList(GrafPtr pGrafDraw, Rect* lprect);
  54.  
  55.     // *** private members ***
  56.     LPBINDHOST        mBindSiteP;
  57.     Uchar8            mDataURL[MAX_URL_STRING];
  58.     ListHandle        mListH;
  59.     listitemdata**    mData;
  60.     Int16            mItemCount;
  61.     Int16            mItemInProgressIndex;
  62.     listitemdata    mItemInProgress;
  63.     FocusSet        mOwnedFoci;
  64.     Boolean            mChanged;
  65.     Boolean            mLoaded;
  66.     Point            mSelectedCell;
  67. };
  68.  
  69. #endif
  70.